Skip to content

ENH: dont guess %Y/%m #49711

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 17, 2022
Merged

Conversation

MarcoGorelli
Copy link
Member

Follow-up from #49389

Guess "year month", but only if it's "%Y-%m" as that's ISO8601 compliant

@MarcoGorelli MarcoGorelli added the Datetime Datetime data dtype label Nov 15, 2022
@MarcoGorelli MarcoGorelli mentioned this pull request Nov 15, 2022
6 tasks
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just curious, is the intent to eventually only guess formats that are ISO compliant? I think removing this functionality is okay if we can justify (document) to the user why

@MarcoGorelli
Copy link
Member Author

The goal would still be to guess most date formats, especially non-ISO8601 ones

It's just for dates which don't have all three of "year, month, and day" that perhaps it's better to not guess (unless they're ISO8601), cc @WillAyd

@WillAyd
Copy link
Member

WillAyd commented Nov 16, 2022

Yea I think adhering to ISO for inference is going to be the easiest to develop / communicate.

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay since this is kind of an edge case I am okay with this then as long as it's stated somewhere (in this or a following PR) that some prior formats are no longer guessed since they were not ISO

@WillAyd WillAyd merged commit 634196a into pandas-dev:main Nov 17, 2022
@WillAyd
Copy link
Member

WillAyd commented Nov 17, 2022

Thanks @MarcoGorelli

MarcoGorelli added a commit to MarcoGorelli/pandas that referenced this pull request Nov 18, 2022
mliu08 pushed a commit to mliu08/pandas that referenced this pull request Nov 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Datetime Datetime data dtype
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants